#ifndef _SYS_REGEX_H_
#define _SYS_REGEX_H_

#include "FanObj.h"
#include "SysTypes.h"

#define REGEX_VTABLE(self)   ((RegexVTable*)((FanObj*)self)->vtable)


extern Type*    Regex_classType;
extern VTable*  Regex_classVTable;


/* [sys::Regex] Attributes */
struct Regex
{
  FanObj        super;
};


/* [sys::Regex] Virtual-table */
typedef struct RegexVTable
{
  FanObjVTable  super;
} RegexVTable;


/* [sys::Regex] Methods and fields */
Bool            Regex_equals(Obj self, NullableObj obj);
Int             Regex_hash(Obj self);
Str*            Regex_toStr(Obj self);
Regex*          Regex_fromStr(Str* pattern);
Regex*          Regex_glob(Str* pattern);
Bool            Regex_matches(Regex* self, Str* s);
RegexMatcher*   Regex_matcher(Regex* self, Str* s);
List*           Regex_split_1(Regex* self, Str* s);
List*           Regex_split(Regex* self, Str* s, Int limit);


/* [sys::Regex] Type-system functions */
Type*           Regex_initType(void);
VTable*         Regex_initVTable(void);
void            Regex_initStatic(void);


#endif
